package com.general.framework.core.schema;

/**
 * Mongo分页
 * @author leejean
 */
public class MongoPageHelper {

    public static long getSkip(PageRequest pageRequest) {
        return (pageRequest.getPage() - 1) * pageRequest.getSize();
    }

    public static int getLimit(PageRequest pageRequest) {
        return pageRequest.getSize();
    }

}
